Date & Time (datetime)

Time (time)

min

The smallest value allowed in a time object. All values are based using 00:00:00.000000 as 0.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.min","datetime.time.min":"min","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{},"height":32,"width":120,"step":"set min","data_to_var":"min","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"min":0}

max

The largest value allowed in a time object. All values accurate to the microseconds. max is equivalent to 23:59:59.999999.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.constants.max","datetime.constants.max":"max","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{},"height":32,"width":120,"step":"set max","data_to_var":"max","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"max":86399999999}

new

All arguments are optional. Arguments are integers (or string representations of integers), in the following ranges:

  • 0 <= hour <= 23
  • 0 <= minute <= 59
  • 0 <= second <= 59
  • 0 <= microsecond <= 999999
If an argument outside those ranges is given, an error is raised.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.new","datetime.time.new":"new","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"hour":12,"minute":34,"second":56,"microsecond":123456},"height":32,"width":120,"step":"set new_time","data_to_var":"new_time","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"new_time":45296123456}

hour

Return the hour for the time provided. Between min_hour and max_hour inclusive. For this example we're using the time 12:34:56.123456.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.hour","datetime.time.hour":"hour","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"time":45296123456},"height":32,"width":120,"step":"set time_hour","data_to_var":"time_hour","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"time_hour":12}

minute

Return the minute for the time provided. Between min_minute and max_minute inclusive. For this example we're using the time 12:34:56.123456.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.minute","datetime.time.minute":"minute","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"time":45296123456},"height":32,"width":120,"step":"set time_minute","data_to_var":"time_minute","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"time_minute":34}

second

Return the second for the time provided. Between min_second and max_second inclusive. For this example we're using the time 12:34:56.123456.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.second","datetime.time.second":"second","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"date":45296123456},"height":32,"width":120,"step":"set time_second","data_to_var":"time_second","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"time_second":56}

microsecond

Return the microsecond for the time provided. Between min_microsecond and max_microsecond inclusive. For this example we're using the time 12:34:56.123456.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.microsecond","datetime.time.microsecond":"microsecond","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"date":45296123456},"height":32,"width":120,"step":"set time_microsecond","data_to_var":"time_microsecond","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"time_microsecond":123456}

replace

Return a time with the same value, except for those parameters given new values by whichever keyword arguments are specified. For this example we're using the time 00:00:00.000000 and replacing it with 12:34:56.123456.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.replace","datetime.time.replace":"replace","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"time":0,"hour":12,"minute":34,"second":56,"microsecond":123456},"height":32,"width":120,"step":"replace time","data_to_var":"replaced_time","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"replaced_time":45296123456}

isoformat

Return a string representing the date and time in ISO 8601 format, MM:SS.mmmmmm or, if microsecond is 0, YYYY-MM-DDTHH:MM:SS. For this example we're using the ordinal corresponding to the datetime 12:34:56.123456.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.isoformat","datetime.time.isoformat":"isoformat","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"time":45296123456},"height":32,"width":120,"step":"set iso_time","data_to_var":"iso_time","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"iso_time":"12:34:56.123456"}

strftime

Return a string representing the time, controlled by an explicit format string.

 

{ }
[{"paths":[],"data":{"datetime":"datetime","call":"datetime.time.strftime","datetime.time.strftime":"strftime","uuid":"071651f79538c5be3173b651cc9bcb7e","args":{"date":45296123456,"format":"%H:%M:%S"},"height":32,"width":120,"step":"format datetime","data_to_var":"formatted_datetime","y":0,"x":0,"type":"library","maxpaths":1}}]

Example Response

{"formatted_time":"12:34:56"}